<%@ page contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="/common/init.jsp"%>
<link href="<c:url value='/admin/css/custom.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/admin/css/style.css'/>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<c:url value='/resources/js/jquery-1.7.2.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resources/xheditor/xheditor-1.2.1.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resources/xheditor/xheditor_lang/zh-cn.js'/>"></script>
<script type="text/javascript">
function checkNews() {
	title = document.getElementById("title");
	content = document.getElementById("newsContent");
	if (title.value.length == 0) {
		alert("新闻标题不能为空");
		return false;
	}
	return true;
}
</script>
<style type="text/css">
<!--
body {
	background: #ffffff;
	margin-top:10px;
	margin-left:5px;
	margin-right:5px;
}
-->
</style>
<body>
<div class="EpmsSubTitle"><p><b>发布新闻</b></p>
</div>
<form action="sendnews.action" method="post" onsubmit="return checkNews();">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="EpmsTable">
	<tr>
		<td class=EpmsTdTitle width="15%">标题</td>
		<td class="EpmsTdNoColor" width="85%">
			<input type="text" id="title" name="news.title" value=""/>
		</td>
	</tr>
	<tr>
		<td class=EpmsTdTitle>类别</td>
		<td class="EpmsTdNoColor">
			<select name="news.type" id="newsType" style="width: 145px;">
	              <c:forEach var="newss" items="${newsList }">
	              	<option value="${newss.code}">${newss.name}</option>
				  </c:forEach>
	        </select>
		</td>
	</tr>
	<tr>
		<td class=EpmsTdTitle>内容</td>
		<td class="EpmsTdNoColor">
			<textarea rows="30" cols="80" name="news.content" id="newsContent" class="xheditor"></textarea>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center">
			<input type="submit" name="button" id="button" value="发布" class="inputSubmit" />
		</td>
	</tr>
</table>
</form>
</body>